package com.me.launcher.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * @author hejiangwei
 * 主工作区的页面滑动适配器
 */
public class MainPagerAdapter extends FragmentPagerAdapter {
    ArrayList<Fragment> mdatas;

    public MainPagerAdapter(FragmentManager fm, ArrayList<Fragment> mdatas) {
        super(fm);
        this.mdatas = mdatas;
    }

    @Override
    public android.support.v4.app.Fragment getItem(int position) {
        return mdatas.get(position);
    }

    @Override
    public int getCount() {
        return mdatas.size();
    }
}

